<?php
auth_redirect();
check_user_is_admin();

$xajax = new xajax(); 
//$xajax->debugOn(); // Uncomment this line to turn debugging on
$xajax->registerFunction("logoutFunc");

$xajax->registerFunction("saveEditOption");
$xajax->processRequests();
?>

<?php get_header(); ?>

<DIV id=container>
<BR/>

<DIV id=searchform>

<table>
<tr>
    <th class="short">&nbsp;</th>
    <th class="short">名称</th>
    <th class="short"><span class="info_s">注释</span></th>
    <th class="short"><span class="info_s">值</span></th>
    <th class="short">&nbsp;</th>
    <th class="short">&nbsp;</th>
</tr>

	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>	

<tr class="withover">
	<td class="count"><span><?php the_optionadmn_id(); ?><span></td>
    <td class="short"><span><?php the_optionadmn_name(); ?><span></td>
    <td class="short"><span><?php the_optionadmn_des(); ?><span></td>
    <td class="short"><textarea name="value<?php the_optionadmn_id(); ?>" rows="5" cols="40" id="value<?php the_optionadmn_id(); ?>" class="form-full"><?php the_optionadmn_value(); ?></textarea></td>
    <td class="short"><input type="submit" value="保存" onclick="xajax_saveEditOption(<?php the_optionadmn_id(); ?>,document.getElementById('value<?php the_optionadmn_id(); ?>').value);" /></td>

</tr>

	<?php endwhile; else: ?>
		<?php //header("location:./"); ?>
	<?php endif; ?>

</table>


<br/>

</DIV>

<?php get_footer(); ?>

